###out:src/main/java/${config.basePackageName?replace(".","/")}/${config.modulePackageName?replace(".","/")}/${config.controllerPackageName?replace(".","/")}/${root.beanName}Controller.java
package ${config.basePackageName}.${config.modulePackageName}.${config.controllerPackageName};


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.stereotype.Controller;

import com.alibaba.fastjson.JSONObject;
import ${config.basePackageName}.${config.modulePackageName}.common.persist.BaseController;
import ${config.basePackageName}.${config.modulePackageName}.common.persist.Page;
import ${config.basePackageName}.${config.modulePackageName}.common.util.BaseReturn;
import ${config.basePackageName}.${config.modulePackageName}.common.util.BaseReturnCode;
import ${config.basePackageName}.${config.modulePackageName}.common.util.SessionUser;
import ${config.basePackageName}.${config.modulePackageName}.common.util.StringUtils;
import ${config.basePackageName}.${config.modulePackageName}.common.util.UserUtils;

import ${config.basePackageName}.${config.modulePackageName}.${config.daoPackageName}.${root.beanName}Dao;
import ${config.basePackageName}.${config.modulePackageName}.${config.entityPackageName}.${root.beanName};
import ${config.basePackageName}.${config.modulePackageName}.${config.servicePackageName}.${root.beanName}Service;



/**
 *${root.tableComment} 控制层
 * @author:${config.authorName} 
 * @createTime:${config.createTime}
 * @version:${config.version}
 */
@RestController
@RequestMapping("${root.beanName ?lower_case}")
public class ${root.beanName}Controller  extends BaseController<${root.beanName}Service, ${root.beanName}Dao, ${root.beanName}>{

	/*
	 * 获取到分页数据
	 */
 	@PostMapping(value = "findPage")
    public String findPage(String pageNo,String pageSize, ${root.beanName} entity) {
   
		if(!StringUtils.isNumeric(pageNo) || !StringUtils.isNumeric(pageSize)){
			return new BaseReturn(BaseReturnCode.PARAMS_ERROR, "pageNo、pageSize参数错误").toJSONString();
		}
      
		Page<${root.beanName}> result = service.findPage( new Page<${root.beanName}>(Integer.parseInt(pageNo), Integer.parseInt(pageSize)), entity);
       return new BaseReturn("操作成功",result).toJSONString();
    }
    
    /*
	 * 获取详细页数据
	 */
    @PostMapping(value = "get")
    public String get(String id){
     if (StringUtils.isBlank(id)) {
			return new BaseReturn(BaseReturnCode.PARAMS_ERROR, "参数id不能为空").toJSONString();
		}
    	${root.beanName} entity = new ${root.beanName}();
		entity.setId(id);
		${root.beanName} result = service.findByEntity(entity);
		return new BaseReturn("操作成功",result).toJSONString();
    }
     /*
	 * 保存数据
	 */
    @PostMapping(value = "save")
    public String save(${root.beanName} entity){
    service.save(entity);
    return new BaseReturn("操作成功").toJSONString();
    }
    
    /*
	 * 删除数据
	 */
     @PostMapping(value = "delete")
    public String delete(String id){
    if (StringUtils.isBlank(id)) {
			return new BaseReturn(BaseReturnCode.PARAMS_ERROR, "参数id不能为空").toJSONString();
		}

		${root.beanName} entity = new ${root.beanName}();
		entity.setId(id);
		service.deleteByLogic(entity);
		return new BaseReturn("操作成功").toJSONString();
    
    }
    /*
	 * 更新数据
	 */
    @PostMapping(value = "update")
    public String update(${root.beanName} entity){
     	 if (StringUtils.isBlank(entity.getId())) {
 			return new BaseReturn(BaseReturnCode.PARAMS_ERROR, "参数id不能为空").toJSONString();
 		}
    	 service.save(entity);
    return new BaseReturn("操作成功").toJSONString();
    }






}
